
package com.sasis.service.impl;

import java.util.List;

import com.sasis.service.impl.BaseManager;
import com.sasis.model.ServerProtect;
import com.sasis.dao.ServerProtectDao;
import com.sasis.service.ServerProtectManager;

public class ServerProtectManagerImpl extends BaseManager implements ServerProtectManager {
    private ServerProtectDao dao;

    /**
     * Set the Dao for communication with the data layer.
     * @param dao
     */
    public void setServerProtectDao(ServerProtectDao dao) {
        this.dao = dao;
    }

    /**
     * @see com.sasis.service.ServerProtectManager#getServerProtects(com.sasis.model.ServerProtect)
     */
    public List getServerProtects(final ServerProtect serverProtect) {
        return dao.getServerProtects(serverProtect);
    }

    /**
     * @see com.sasis.service.ServerProtectManager#getServerProtect(String id)
     */
    public ServerProtect getServerProtect(final String id) {
        return dao.getServerProtect(new Integer(id));
    }

    /**
     * @see com.sasis.service.ServerProtectManager#saveServerProtect(ServerProtect serverProtect)
     */
    public int saveServerProtect(ServerProtect serverProtect) {
        return dao.saveServerProtect(serverProtect);
    }

    /**
     * @see com.sasis.service.ServerProtectManager#removeServerProtect(String id)
     */
    public void removeServerProtect(final String id) {
        dao.removeServerProtect(new Integer(id));
    }
}
